{{css "/libs/bootstrap/dist/css/bootstrap.css, /libs/font-awesome/css/font-awesome.css, /libs/animate.css/animate.css,/libs/simditor/styles/simditor.css,/css/base.css,/css/editor.css"
}} {{js "/libs/jquery/dist/jquery.js, /libs/bootstrap/dist/js/bootstrap.js, /libs/simple-module/lib/module.js,/libs/simple-hotkeys/lib/hotkeys.js,/libs/simple-uploader/lib/uploader.js,/libs/simditor/lib/simditor.js,/js/base.js,/js/editor.js"
}}

<div class="container-fluid editor-page">
    <div class="row">
        <div class="col-md-2 sidebar-wrapper">
            <div class="sidebar-box">
                <div class="form-group">
                    <a class="btn btn-primary btn-return" href="/">回到首页</a>
                </div>
                <div class="form-group">
                    <a class="btn btn-primary btn-add">新建文章</a>
                </div>

                <ul class="nav nav-pills nav-stacked">
                    {{#each essays}}
                    <li>
                        <a href="/editor/{{_id}}">  {{title}}  </a>
                        <span class="btn-del fa fa-times"></span>
                    </li>
                    {{/each}}
                </ul>
            </div>
        </div>

        <div class="col-md-offset-2 col-md-10 editor-wrapper">
            <div class="editor-box">
                {{#if essayItem}}
                <form>
                    <input type="hidden" value={{essayItem._id}} id="essay-id"></input>
                    <input name="title" type="text" value="{{essayItem.title}}" id="essay-title" class="essay-title"></input>
                    <select class="form-control essay-cate">
                       {{#each cates}}
                       <option value={{value}} {{#equal value  ../essayItem.cate}} selected {{/equal}}>{{name}}</option>
                       {{/each}}
                    </select>
                    <button class="fa fa-floppy-o btn btn-primary btn-save" id="btn-save"></button>
                    <textarea id="editor" placeholder="请输入文章内容">  {{essayItem.content}}</textarea>
                </form>
                {{/if}}
            </div>
        </div>
    </div>
</div>